#include "label.h"
#include <QDebug>
#include <QMouseEvent>

Label::Label(QWidget *parent)
    :QLabel((parent))
{

}

void Label::enterEvent(QEvent *event)
{
    (void)event;
    qDebug() << "enterEvent";
}

void Label::leaveEvent(QEvent *event)
{
    (void)event;
    qDebug() << "leaveEvent";
}

void Label::mousePressEvent(QMouseEvent *event)
{
    QString str1 = QString("鼠标按下的位置，x:%1 y:%2").arg(event->x()).arg(event->y());
    qDebug() << str1;
}
